﻿using AppFramework.DinosaursParkMes.MaterialModel;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppFramework.DinosaursParkMes.ProductionPlanning
{
    public class UniqueIdCodeMap : IEntityTypeConfiguration<AppFramework.DinosaursParkMes.MaterialModel.UniqueIdCode>
    {
        public void Configure(EntityTypeBuilder<AppFramework.DinosaursParkMes.MaterialModel.UniqueIdCode> builder)
        {
            builder.ToTable("tb_UniqueIdCode"); 
            builder.HasKey(x => x.Id).HasName("主键");
            builder.Property(x => x.Barcode).HasComment("条码").HasColumnType("varchar(200)").IsRequired();
            builder.Property(x => x.Barcodestandard).HasComment("条码格式").HasColumnType("varchar(20)").IsRequired();
            builder.Property(x => x.Barcodetype).HasComment("条码类型").HasColumnType("varchar(20)");
            builder.Property(x => x.Materialnumber).HasComment("物料编号").HasColumnType("varchar(40)").IsRequired();
            builder.Property(x => x.Materialname).HasComment("物料名称").HasColumnType("varchar(20)").IsRequired();
            builder.Property(x => x.Barcodecontent).HasComment("条码内容").HasColumnType("varchar(40)");
            builder.Property(x => x.Remark).HasComment("备注").HasColumnType("varchar(200)");
        }
    }
}
